filePrefix = 'data/100/';

nbCities = 100;
for i = 1:10
   Cost = generateCosts(nbCities);
   fileP = strcat(filePrefix,num2str(i),'/');
        
   for j = 1:9
       
       file = strcat(fileP,'genCost',num2str(i),'_',num2str(j),'.dat');
       GenCost = fillRandom(Cost,nbCities*nbCities*(j/10),1000);
       csvwrite(file, GenCost);
       
       cities = 1:nbCities;
       cities = cities(randperm(nbCities));
       [c result] = tsp(cities,2000,0.5,1000,nbCities/2,GenCost);
       file = strcat(fileP,'Result',num2str(i),'_',num2str(j),'.dat');
       csvwrite(file, result);
   end
end